import { PoolManager } from 'db://assets/Scripts/Framework/Managers/PoolManager';
import { InGameManager } from '../Managers/InGameManager';
import { Item } from './Item';

export class Heal extends Item {

    heal: number;
    time: number;
    type: number;
    maxNum: number = 5;
    canUse: boolean = true;

    static Init(_num: number, _num2: number): Heal {
        let data = InGameManager.itemsJson.Heal[_num];
        let heal = PoolManager.GetItem(Heal);
        heal.num = _num2;
        heal.itemName = data.name;
        heal.heal = data.heal;
        heal.time = data.time;
        heal.type = data.type;
        heal.sfUrl = data.spriteFrame;
        return heal;
    }

}